home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1070 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.8 KB

  1. Path: ohstpy.mps.ohio-state.edu!vancleef
  2. From: vancleef@ohstpy.mps.ohio-state.edu
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: HELP: Calling functions from DLLs
  5. Message-ID: <1996Jan9.004130.8690@ohstpy>
  6. Date: 9 Jan 96 00:41:30 -0500
  7. References: <1996Jan8.194827.23308@zippy.dct.ac.uk>
  8. Distribution: world
  9. Organization: The Ohio State University, Department of Physics
  10.  
  11. I don't know if this is your problem, but if you want
  12. to link with a .DLL in Borland C++, use the IMPLIB facility.
  13.  
  14. This creates a .LIB file from you .DLL, which you link
  15. with your application. The .LIB contains information as to
  16. how the .DLL is used.
  17.  
  18. -Garrett
  19.  
  20.  
  21.  
  22.  
  23. In article <1996Jan8.194827.23308@zippy.dct.ac.uk>, ds11@st-and.ac.uk (Darren Steers) writes:
  24. > Hi,
  25. > Can you help?  I have been supplied with a DLL (not source code) 
  26. > from a third party. It was compiled using MS Visual C++.
  27. > I am using Borland C++ 4.5 and am having problems calling the functions
  28. > from the third party DLL.
  29. > When I wrote a simple test DLL (Beep.cpp) the function prototype and
  30. > declaration were like this (From a book)
  31. >      void _FAR _EXPFUNC MakeBeep (int iCount);
  32. > This worked great and I could use the function in my application 
  33. > (CallBeep.cpp) to my hearts content.
  34. > HOWEVER,  the 3rd party DLL had its functions declared in this style
  35. >      void FAR PASCAL MakeBeep (int iCount);
  36. > When I try to use this function I get this error message
  37. >      Linker Error: Undefined symbol MakeBeep(int) in module CALLBEEP.CPP
  38. > Can I get my application to recognise functions declared in the FAR PASCAL
  39. > format, or do I need to get the source code and change the function
  40. > prototypes and definitions to _FAR _EXPFUNC ????
  41. > Thanks for any help.
  42. > Darren Steers
  43. > University of St Andrews
  44. > Scotland
  45. > ds11@st-and.ac.uk
  46.